package com.design.behavior.observer.cainiao;

/**
 * @ProjectName: design
 * @Package: com.design.behavior.observer.cainiao
 * @ClassName: OctalObserver
 * @Author: shenaiguo
 * @Description:
 * @Date: 2020/11/23 0023 20:29
 */
// 步驟 3
public class OctalObserver extends Observer{

    public OctalObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "Octal String: "
                + Integer.toOctalString( subject.getState() ) );
    }
}
